<!-- 搜索1 -->
<template>
	<view class="sou1">
		<div class="nav" style="height: 60rpx;"></div>
		<div class="one">
			<div class="left">
				<u-icon name="arrow-left" @click="fan"></u-icon>
			</div>
			<div class="right">
				<u-search placeholder="搜索关键词" @custom="fan" shape="square" v-model="keyword" :show-action="true" actionText='取消'></u-search>
			</div>
		</div>
		<div class="two">
			<div class="box">
				<image src="../../../static/tabbar/个人.png" mode=""></image>
				<div class="right">
					<div class="p">客户</div>
					<div class="p">共{{list.length}}个结果</div>
				</div>
			</div>
			<div class="ul">
				<div class="li" v-for="item in list" :key="item.id">
					<div class="left">
						<div class="p1">{{item.customerName}}</div>
						<div class="p2">最后跟进：{{item.followTime}}</div>
						<div class="p3">客户星级：<u-rate :count="count" v-model="value"></u-rate></div>
					</div>
					<div class="right">
						<div class="p1">
							<div class="pp" >·</div>
							<div class="p">正在跟进</div>
						</div>
						<image src="../../../static/tabbar/个人.png" mode=""></image>
						<div class="p2">{{item.linkmanName}}</div>
					</div>
				</div>
			</div>
		</div>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[],
				count: 5,
				value: 4,
			}
		},
		methods: {
			fan(){
				uni.navigateBack()
			}
		},
		created(){
			uni.request({
			  url: "http://127.0.0.1:3000/salesLead/getAll", //接口地址
			  method: "POST",
			  success: (res) => {
			    this.list = res.data.data;
			    console.log(this.list);
			  },
			});
		}
	}
</script>

<style lang="scss">
.sou1{
	width: 100%;
	height: 100vh;
	overflow: auto;
	.one{
		width: 100%;
		display: flex;
		padding: 0 20rpx;
		.left{
			width: 50rpx;
			display: flex;
			align-items: center;
		}
		.right{
			width: calc(100% - 50rpx);
		}
	}
	.two{
		width: 100%;
		background-color: #f9f9f9;
		margin-top: 30rpx;
		padding:20rpx;
		.box{
			display: flex;
			image{
				width: 100rpx;
				height: 100rpx;
				margin-right: 20rpx;
			}
		}
		.ul{
			width: 100%;
			margin-top: 40rpx;
			.li{
				background-color: white;
				padding: 20rpx;
				border-radius: 20rpx;
				margin-bottom: 30rpx;
				width: 100%;
				display: flex;
				justify-content: space-between;
				.left{
					display: flex;
					flex-direction: column;
					justify-content: space-evenly;
					.p1{
						font-weight: 600;
						color: #999999;
					}
					.p2{
						color: #999999;
					}
					.p3{
						color: #999999;
						display: flex;
					}
				}
				.right{
					display: flex;
					flex-direction: column;
					justify-content: space-evenly;
					align-items: center;
					image{
						width: 70rpx;
						height: 70rpx;
					}
					.p1{
						display: flex;
						align-items: center;
						.pp{
							font-size: 60rpx;
							color: #1261cc;
							margin-right: 20rpx;
						}
					}
				}
			}
		}
	}
	
}
</style>
